//
//  ViewBase.m
//  lib
//

//
#import "ViewBase.h"




@implementation ViewBase


- (BOOL)shouldAutorotate:(UIInterfaceOrientation)orie
{
	if(IS_PAPERBACK == YES){
		return	NO;		
	}else{
		BOOL ret = YES;
		
		for( id view in self.subviews )
		{
			if( [view respondsToSelector:@selector(shouldAutorotate:)] )
			{
				if( !(ret = [view shouldAutorotate:orie]) )
					return ret;
			}
		}
		

		return YES;
	}
}


- (void)willRotate:(UIInterfaceOrientation)orie duration:(NSTimeInterval)duration
{
	for( id view in self.subviews )
	{
		if( [view respondsToSelector:@selector(willRotate:duration:)] )
			[view willRotate:orie duration:duration];
	}
}


- (void)didRotate:(UIInterfaceOrientation)orie
{
	for( id view in self.subviews )
	{
		if( [view respondsToSelector:@selector(didRotate:)] )
			[view didRotate:orie];
	}
}



- (void)update
{
	for( id view in self.subviews )
	{
		if( [view respondsToSelector:@selector(update)] )
			[view update];
	}
}

@end
